include icon_names.macro

SUBDIRS = 16 22 scalable

BUILT_SOURCES = icon_decl.h icon_impl.cpp icon_builtin_icon_list.h

icon_decl.h: Makefile
	rm -f $@
	@for n in $(icon_names);do name=$$(echo "$$n" | tr "[a-z-]" "[A-Z_]");echo "static const char *$$name;" >> $@;done
icon_impl.cpp: Makefile
	rm -f $@
	@for n in $(icon_names);do name=$$(echo "$$n" | tr "[a-z-]" "[A-Z_]");echo "const char *IconManager::$$name = \"$$n\";" >> $@;done
icon_builtin_icon_list.h: Makefile
	rm -f $@
	@for n in $(icon_names);do name=$$(echo "$$n" | tr "[a-z-]" "[A-Z_]");echo "$$name," >> $@;done

EXTRA_DIST = icon_names.macro

CLEANFILES = $(BUILT_SOURCES)
